aboutsummaryrefslogtreecommitdiff
path: root/src/app/manga/[title]/[id]/buttons.jsx
diff options
context:
space:
mode:
authorzephex <[email protected]>2024-04-20 13:34:53 +0530
committerzephex <[email protected]>2024-04-20 13:34:53 +0530
commitd6780cf3dad729c69a102ba2940188cf1e6bcbf4 (patch)
treed10a2aefef6664c42439f165c73722c514b032bc /src/app/manga/[title]/[id]/buttons.jsx
parentfeature added: tracker for mangas (diff)
downloaddramalama-d6780cf3dad729c69a102ba2940188cf1e6bcbf4.tar.xz
dramalama-d6780cf3dad729c69a102ba2940188cf1e6bcbf4.zip
idk whats happening
Diffstat (limited to 'src/app/manga/[title]/[id]/buttons.jsx')
-rw-r--r--src/app/manga/[title]/[id]/buttons.jsx108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/app/manga/[title]/[id]/buttons.jsx b/src/app/manga/[title]/[id]/buttons.jsx
index 4c11705..a6c8d75 100644
--- a/src/app/manga/[title]/[id]/buttons.jsx
+++ b/src/app/manga/[title]/[id]/buttons.jsx
@@ -1,54 +1,54 @@
-"use client";
-
-import styles from "./info.module.css";
-import Link from "next/link";
-import { storeLocal } from "../../history/storeData";
-
-export default function Buttons({ content: data }) {
- function store_to_local(title, chapter, volume, image, id, id2) {
- let data = {
- title: title,
- chapter: chapter,
- volume: volume,
- image: image,
- id: id,
- mangaId: id2,
- };
- storeLocal(data);
- }
-
- return (
- <div className={styles.ChapterContainer}>
- {data.chapters &&
- data.chapters.map((item, index) => {
- if (item.pages !== 0) {
- return (
- <Link
- key={index}
- href={{
- pathname: `/manga/info/read/${item.id}`,
- }}
- onClick={() => {
- store_to_local(
- data.title.english || data.title.romaji,
- parseInt(item.chapterNumber),
- parseInt(item.volumeNumber),
- data.image,
- item.id,
- data.id
- );
- }}
- >
- <button key={index}>
- <div>
- <p>Chapter: {item.chapterNumber}</p>
- <p>Volume: {item.volumeNumber}</p>
- </div>
- </button>
- </Link>
- );
- }
- })}
- </div>
- );
-}
+"use client";
+
+import styles from "./info.module.css";
+import Link from "next/link";
+import { storeLocal } from "../../history/storeData";
+
+export default function Buttons({ content: data }) {
+ function store_to_local(title, chapter, volume, image, id, id2) {
+ let data = {
+ title: title,
+ chapter: chapter,
+ volume: volume,
+ image: image,
+ id: id,
+ mangaId: id2,
+ };
+ storeLocal(data);
+ }
+
+ return (
+ <div className={styles.ChapterContainer}>
+ {data.chapters &&
+ data.chapters.map((item, index) => {
+ if (item.pages !== 0) {
+ return (
+ <Link
+ key={index}
+ href={{
+ pathname: `/manga/info/read/${item.id}`,
+ }}
+ onClick={() => {
+ store_to_local(
+ data.title.english || data.title.romaji,
+ parseInt(item.chapterNumber),
+ parseInt(item.volumeNumber),
+ data.image,
+ item.id,
+ data.id
+ );
+ }}
+ >
+ <button key={index}>
+ <div>
+ <p>Chapter: {item.chapterNumber}</p>
+ <p>Volume: {item.volumeNumber}</p>
+ </div>
+ </button>
+ </Link>
+ );
+ }
+ })}
+ </div>
+ );
+}